//
//  @ Project : Galaxy Star Trading System
//  @ File Name : MarketDataProviderManager.h
//  @ Date : 2014/9/5
//  @ Author :
//
//

#if !defined(_CMARKETDATA_CLIENT_MANAGER_H)
#define _CMARKETDATA_CLIENT_MANAGER_H

#include "ProviderManager.h"

namespace GSTrader
{
	namespace TradeStrategy
	{
		class TRADE_STRATEGY_API  CMarketDataProviderManager : public CProviderManager
		{
		public:
			CMarketDataProviderManager(CFramework* pFramework);
			virtual ~CMarketDataProviderManager();

			CMarketDataProvider* GetFirstProvider();
			CMarketDataProvider* GetMarketDataProvider(CConnectionInfo* pUser);
			CMarketDataProvider* GetProviderById(int nProviderId);
			CMarketDataProvider* GetProviderByType(int nType);

			void GetMarketDataProvider(vector<CMarketDataProvider*>& vMarketDataProvider);
			void OnFrontDisconnected(CAccountData* pAccount);

			CMarketDataProvider* GetMarketDataConnByInfo(CConnectionInfo* pInfo);
			CMarketDataProvider* ConnMarketDataServer(CConnectionInfo* pInfo, CSubscribeInstrument* pSubscribe);
		};
	}
}

#endif // _CMARKETDATA_CLIENT_MANAGER_H